<%@ page contentType="text/html;charset=UTF-8"%>
<!DOCTYPE html>
<html>
	<head>
	<meta charset="utf-8">
	<%@ include file="/common/import.jsp"%>
	<script> 
		var thsTitle = "${sort.sortName}查询"; 
	    var objName="${objName}";
	    var page_name='${sysName}/${objName}-edit.html';
	    $(function() {
	    	${objName}Search();
	    });
	    //查询
		function ${objName}Search(){
			searchSubmit(objName,"${objName}List");
		}
		function addInfo(){
		    var ${objName}Obj = new Object(); 
		    inputAobj(objName,${objName}Obj,'',page_name);
		}
	</script>
</head>
<body class="home-template">
<!-- 查询条件 -->
<div class="easyui-panel" title="${sort.sortName}查询" collapsible="true">
    <form id="${objName}List_form" name="queryForm">
		<div style="padding-left:40">
			<input type="hidden" name="page"  value="1">
			<input type="hidden" name="rows"  value="10">
		    <a href="javascript:void(0);" onclick="${objName}Search();" class="easyui-linkbutton" >查询</a>
		    <a href="javascript:void(0);" onclick="addInfo();" class="easyui-linkbutton" >增加</a>
		</div>
	</form>
</div>

<!-- 正文开始 -->
<div class="" title="${sort.sortName}列表" collapsible="true">
	<table id="${objName}List_table" class="info" cellspacing="1" cellpadding="0">
		<tr class='active' id="title2" >
			<#list metadatas as mt>
		    <#if mt.dataRestrict!="1">
		    <th>${mt.dataFullName}</th>
			</#if>
		  </#list>
		</tr>
	</table>
	<div id="${objName}List_page" class="page"></div>

</div>
<!-- 正文结束 -->
<%@ include file="/common/top.jsp"%>
<script type="text/template" id="${objName}List_html">
	<? for ( var i = 0; i < rows.length; i++) {?>
		<tr>
			<#list metadatas as mt>
	        <#if mt.dataRestrict!="1">
			<td><?=rows[i].${mt.dataAttr}?></td>
            </#if>
	        </#list>
			<td><a href="javascript:void(0);" onclick="editAobj(objName,'<?=rows[i].${objName}Id?>','',page_name);" class="easyui-linkbutton" >修改</a>｜
              <a href="javascript:void(0);" onclick="delAobj(objName,'<?=rows[i].${objName}Id?>','','1');" class="easyui-linkbutton" >删除</a></td>
		</tr>
	<?}?>  		
</script>
</body>
</html>